package com.pet.server.po;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;

/**
 * PetInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "answer_info")
public class AnswerInfo implements java.io.Serializable {

	// Fields

	private Integer answerId;
	//回复answer_id
	private Integer replyId;
	//主键
	private Integer oid;
	//用户id
	private Integer userId;
	//回答
	private String answerText;
	//时间
	private Date createTime;
	//是否采纳
	private String state;
	//昵称
	private String nickName;
	
	// Constructors

	/** default constructor */
	public AnswerInfo() {
	}

	public AnswerInfo(Integer answerId, Integer replyId, Integer oid,
			Integer userId, String answerText, Date createTime, String state,String nickName) {
		super();
		this.answerId = answerId;
		this.replyId = replyId;
		this.oid = oid;
		this.userId = userId;
		this.answerText = answerText;
		this.createTime = createTime;
		this.state = state;
		this.nickName = nickName;
	}


	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "answer_id", unique = true, nullable = false)
	public Integer getAnswerId() {
		return answerId;
	}

	/**
	 * @param answerId the answerId to set
	 */
	public void setAnswerId(Integer answerId) {
		this.answerId = answerId;
	}

	@Column(name = "reply_id", nullable = false, length = 32)
	public Integer getReplyId() {
		return replyId;
	}

	/**
	 * @param replyId the replyId to set
	 */
	public void setReplyId(Integer replyId) {
		this.replyId = replyId;
	}

	@Column(name = "oid", nullable = false, length = 32)
	public Integer getOid() {
		return oid;
	}

	/**
	 * @param oid the oid to set
	 */
	public void setOid(Integer oid) {
		this.oid = oid;
	}

	@Column(name = "user_id", nullable = false, length = 32)
	public Integer getUserId() {
		return userId;
	}

	/**
	 * @param userId the userId to set
	 */
	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "answer_text", nullable = false, length = 512)
	public String getAnswerText() {
		return answerText;
	}

	/**
	 * @param answerText the answerText to set
	 */
	public void setAnswerText(String answerText) {
		this.answerText = answerText;
	}

	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * @param createTime the createTime to set
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "state", nullable = false, length = 32)
	public String getState() {
		return state;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	
	@Column(name = "nick_name", nullable = false, length = 32)
	public String getNickName() {
		return nickName;
	}



	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
}